<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>专业数据处理平台</title>
    <meta name="description" content="这是一个 algorithmList 页面">
    <meta name="keywords" content="algorithmList">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="${ctx}/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${ctx}/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="${ctx}/assets/css/admin.css">
    <link rel="stylesheet" href="${ctx}/assets/css/app.css">
    <link rel="stylesheet" href="${ctx}/assets/css/layer.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/xcConfirm.css"/>
</head>

<body data-type="chart">
        <!--标题-->
        <div class="tpl-content-page-title">
            工作流系统 --算法
        </div>
        <!--面包屑-->
        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">首页</a></li>
            <li><a href="#">算法</a></li>
            <li class="am-active">算法列表</li>
        </ol>
        <div class="tpl-portlet-components">
            <div class="portlet-title">
                <div class="caption font-green bold">
                    算法列表
                </div>
                <div class="action" style="float: right;">
                    <ul class="actions-btn">
                        <li class="blue" onclick="unifiedDeletion()">统一删除</li>
                    </ul>
                </div>
            </div>
            <div class="tpl-block">
                <!--栅格化-->
                <div class="am-g">
                    <div class="am-u-sm-12">
                        <table class="am-table am-table-striped am-table-hover table-main" id="algorithmTableList">
                            <thead>
                            <tr>
                                <th style="width: 34px"><input type="checkbox" id="checkAll"></th>
                                <th>序号</th>
                                <th>算法名称</th>
                                <th>算法类型</th>
                                <th>版本号</th>
                                <th>研发单位</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                        </table>
                        <div class="am-cf am-center">
                            <div id="test1"style="text-align: center;"am-pagination="pagination_new" pagenumber="1" totalpage="6"></div>
                        </div>
                        <hr>
                    </div>

                </div>

            </div>

        </div>
<script src="${ctx}/assets/js/jQuery/jquery.min.js"></script>
<script src="${ctx}/assets/js/common/config.js"></script>
<script type="text/javascript">
    $(function () {
        $.ajax({
            type: "POST",
            url: constUrl+"AlgorithmServlet",
            dataType: "json",
            data: {
                operateType: "showAll",
                onePageCount: "10",
                currentPage: "1"
            },
            success: function (data) {
                console.log(data);
                addPageNum(data.result);
                addBox(data.result.algorithms);
                paginationInit();
            },
            error:function(XMLHttpRequest, textStatus, errorThrown){
                alert(XMLHttpRequest+textStatus+errorThrown);
            }


        });
    });
    function  addPageNum(data ){
        console.log(data.pageNum);
        $('[am-pagination =pagination_new ]').attr("totalpage",data.pageNum);
    }
</script>
<script src="${ctx}/assets/js/jQuery/jquery-1.9.1.js"></script>
<script src="${ctx}/assets/js/common/xcConfirm.js"></script>
<script src="${ctx}/assets/js/common/amazeui.min.js"></script>
<script src="${ctx}/assets/js/common/app.js"></script>
<script src="${ctx}/assets/js/layer/layer.js"></script>
<script src="${ctx}/assets/js/algorithm/algorithmList.js"></script>
</body>

</html>